<!-- 结算-选中的列表 -->
<template>
  <!-- 产品列表 -->
  <view class="prod-list">
    <view class="prod-item" v-for="(item, index) in listData" :key="index">
      <view class="name" @click="toWarehouse(item, index)">
        {{ item.storeName }}
      </view>
      <view class="item-view" @click="toWarehouse(item, index)">
        <view class="top-view">
          <text class="blue"
            >{{ item.code }} {{ item.name }} {{ item.colorNumber }}</text
          >
          <text class="green p-l-10">{{ item.color }}</text>
        </view>
        <view class="inventory flex">
          <view class="inventory-item flex">
            <view class="label"> 匹数 </view>
            <view class="value">
              {{ item.piecesCount }}
            </view>
          </view>
          <view class="inventory-item flex">
            <view class="label"> 数量 </view>
            <view class="value">
              {{ item.quantity }}
            </view>
          </view>
          <view class="inventory-item flex">
            <view class="label"> 计价 </view>
            <view class="value">
              {{ item.priceQuantity }}
            </view>
          </view>
        </view>
        <view class="inventory flex">
          <view class="inventory-item flex">
            <view class="label"> 单价 </view>
            <view class="value red">
              {{ item.price }}
            </view>
          </view>
          <view class="inventory-item flex">
            <view class="value red"> ￥{{ item.totalPrice }} </view>
          </view>
        </view>
				
        <view class="inventory flex"
				v-if="
          likeList[0].check == false && likeList[1].check == false
            ? false
            : true
        "
				>
          <view class="inventory-item flex" v-if="likeList[0].check">
            <view class="label"> 幅宽 </view>
            <view class="value">
              {{ item.widthValue }}
            </view>
          </view>
          <view class="inventory-item flex" v-if="likeList[0].check">
            <view class="label"> 克重 </view>
            <view class="value">
              {{ item.gramWeightValue }}
            </view>
          </view>
          <view class="inventory-item flex" v-if="likeList[1].check">
            <view class="label"> 规格 </view>
            <view class="value">
              {{ item.spec }}
            </view>
          </view>
        </view>
        <view class="inventory flex" v-if="
          likeList[2].check == false && likeList[3].check == false
            ? false
            : true
        ">
          <view class="inventory-item flex" v-if="likeList[2].check">
            <view class="label"> 缸号 </view>
            <view class="value">
              {{ item.vatNo }}
            </view>
          </view>
          <view class="inventory-item flex" v-if="likeList[3].check">
            <view class="label"> 批号 </view>
            <view class="value">
              {{ item.batchNumber }}
            </view>
          </view>
        </view>
        <view class="inventory flex" v-if="likeList[4].check">
          <view class="inventory-item flex">
            <view class="label"> 辅编号 </view>
            <view class="value">
              {{ item.auxiliaryCode }}
            </view>
          </view>
          <view class="inventory-item flex">
            <view class="label"> 辅名称 </view>
            <view class="value">
              {{ item.auxiliaryName }}
            </view>
          </view>
        </view>
        <view class="inventory flex">
          <view class="inventory-item flex">
            <view class="label"> 备注 </view>
            <view class="value">
              {{ item.remarks }}
            </view>
          </view>
        </view>
      </view>
    </view>
    <!-- <view class="prod-item">
			<view class="name">
				剪样
			</view>
			<view class="item-view">
				<view class="top-view">
					<text class="blue">001 布匹001</text>
					<text class="green p-l-10">白坯</text>
				</view>
				<view class="inventory flex">
					<view class="inventory-item flex">
						<view class="label">
							匹数
						</view>
						<view class="value">
							1
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="label">
							数量
						</view>
						<view class="value">
							1米
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="label">
							计价
						</view>
						<view class="value">
							7米
						</view>
					</view>
				</view>
				<view class="inventory flex">
					<view class="inventory-item flex">
						<view class="label">
							单价
						</view>
						<view class="value red">
							1
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="value red">
							￥8
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="label">
							计价
						</view>
						<view class="value">
							7米
						</view>
					</view>
				</view>
				<view class="inventory flex">
					<view class="inventory-item flex">
						<view class="label">
							仓位
						</view>
						<view class="value red">
							1
						</view>
					</view>
				</view>
			</view>
			<view class="item-view">
				<view class="top-view">
					<text class="blue">001 布匹001</text>
					<text class="green p-l-10">白坯</text>
				</view>
				<view class="inventory flex">
					<view class="inventory-item flex">
						<view class="label">
							匹数
						</view>
						<view class="value">
							1
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="label">
							数量
						</view>
						<view class="value">
							1米
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="label">
							计价
						</view>
						<view class="value">
							7米
						</view>
					</view>
				</view>
				<view class="inventory flex">
					<view class="inventory-item flex">
						<view class="label">
							单价
						</view>
						<view class="value red">
							1
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="value red">
							￥8
						</view>
					</view>
					<view class="inventory-item flex">
						<view class="label">
							计价
						</view>
						<view class="value">
							7米
						</view>
					</view>
				</view>
				<view class="inventory flex">
					<view class="inventory-item flex">
						<view class="label">
							仓位
						</view>
						<view class="value red">
							1
						</view>
					</view>
				</view>
			</view>
		</view> -->
  </view>
</template>

<script>
import { login } from "@/apis/sys/users";

export default {
  name: "",
  props: {
    listData: {
      type: Array,
      default: () => {
        return [];
      },
    },
    likeList: {
      type: Array,
      default: () => {
        return [
          { label: "宽幅/克重", check: true },
          { label: "规格", check: true },
          { label: "缸号", check: true },
          { label: "批号", check: true },
          { label: "辅编号/名称", check: true },
        ];
      },
    },
  },
  data() {
    return {};
  },
  methods: {
    toWarehouse(item, index) {
      this.$emit("procureLink", item, index);
    },
  },
};
</script>

<style lang="scss" scoped>
.prod-list {
  overflow: hidden;
  margin-bottom: 100px;
  .prod-item {
    .name {
      color: #333;
      font-size: 30rpx;
      padding: 20rpx 30rpx;
    }
    .item-view {
      margin-bottom: 20rpx;
      background-color: #fff;
      padding: 20rpx 20rpx 0;
      font-size: 24rpx;
      &:last-child {
        margin-bottom: 0;
      }
      .top-view {
        font-size: 30rpx;
        padding-bottom: 10rpx;
      }
      .inventory-item {
        font-size: 30rpx;
        line-height: 54rpx;
        flex: 1;
        .value {
          padding-left: 10rpx;
          color: #333;
        }
        .label {
          color: #999;
        }
      }
    }
  }
}
</style>